<?php
namespace App\Params\Backend;
use App\Params\Param;
/**
 * 订单售后申请单列表查询参数
 *
 * @author: WangBin
 * @date: 2021/10/11
 * @mail: <849850352@qq.com>
 */
class AfterSalesApplyListParams extends Param
{
    public $apply_bn;
    public $nickname;
    public $order_bn;
    public $state;
    public $start_at;
    public $end_at;
    public $page_size = 20;
    public $page = 1;

    public function rules()
    {
        return [
            'nickname' => 'nullable|string',
            'page_size' => 'nullable|integer',
            'page' => 'nullable|integer',
            'order_bn' => 'nullable|string',
            'start_at' => 'nullable|string',
            'end_at' => 'nullable|string',
            'state' => 'nullable|string',
            'apply_bn' => 'nullable|string',
        ];
    }

    /**
     * @return mixed
     */
    public function getApplyBn()
    {
        return $this->apply_bn;
    }

    /**
     * @param mixed $apply_bn
     */
    public function setApplyBn($apply_bn): void
    {
        $this->apply_bn = $apply_bn;
    }

    /**
     * @return mixed
     */
    public function getNickname()
    {
        return $this->nickname;
    }

    /**
     * @param mixed $nickname
     */
    public function setNickname($nickname): void
    {
        $this->nickname = $nickname;
    }

    /**
     * @return mixed
     */
    public function getOrderBn()
    {
        return $this->order_bn;
    }

    /**
     * @param mixed $order_bn
     */
    public function setOrderBn($order_bn): void
    {
        $this->order_bn = $order_bn;
    }

    /**
     * @return mixed
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * @param mixed $state
     */
    public function setState($state): void
    {
        $this->state = $state;
    }

    /**
     * @return mixed
     */
    public function getStartAt()
    {
        return $this->start_at;
    }

    /**
     * @param mixed $start_at
     */
    public function setStartAt($start_at): void
    {
        $this->start_at = $start_at;
    }

    /**
     * @return mixed
     */
    public function getEndAt()
    {
        return $this->end_at;
    }

    /**
     * @param mixed $end_at
     */
    public function setEndAt($end_at): void
    {
        $this->end_at = $end_at;
    }

    /**
     * @return int
     */
    public function getPageSize(): int
    {
        return $this->page_size;
    }

    /**
     * @param int $page_size
     */
    public function setPageSize(int $page_size): void
    {
        $this->page_size = $page_size;
    }

    /**
     * @return int
     */
    public function getPage(): int
    {
        return $this->page ? -- $this->page : 0;
    }

    /**
     * @param int $page
     */
    public function setPage(int $page): void
    {
        $this->page = $page;
    }
}
